﻿using Kugar.Core.BaseStruct;
using Kugar.Core.Data.MSSQLHelper;
using Kugar.ERPFramework.BLLInterface;
using Kugar.ERPFramework.BLLInterface.Session;
using Kugar.ERPFramework.Core.Entity;

namespace Kugar.ERPFramework.Core.Interfaces
{
    public interface IProjectInstance
    {
        
        ICustomBLLModule GetModuleByName(string moduleName);

        
        T GetModuleByName<T>(string moduleName) where T:ICustomBLLModule;

        /// <summary>
        ///     返回当前实例的信息
        /// </summary>
        ProjectInstanceInfo InstanceInfo { get; }

        /// <summary>
        ///     执行指定模块的指定函数
        /// </summary>
        /// <param name="moduleID"></param>
        /// <param name="methodID"></param>
        /// <param name="paramList"></param>
        /// <returns></returns>
        
        ResultReturn Execute(string moduleID, string methodID, params object[] paramList);

        SQLDataHelper CurrentConnection { get; }

        SQLDataHelper GetOtherConnection(string connectionName = null);

        SessionItem Session { get; }

        

        //ClientCallContext ClientCallContext { get; }

        IProject Project { get; }
    }
}